#coding=utf-8
from jinja2 import filters

def datetimeformat(value, format='%Y-%m-%d %H:%M'):
    return value.strftime(format)


filters.FILTERS['datetimeformat'] = datetimeformat

